import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * 称砝码
 * Created by JiaJia on 2019/6/26 0026.
 */
public class HuaWei034 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        while (scanner.hasNext()){
            int n=scanner.nextInt();
            int[] weight=new int[n];
            int[] number=new int[n];
            for (int i = 0; i <n ; i++) {
                weight[i]=scanner.nextInt();
            }
            for (int i = 0; i <n ; i++) {
                number[i]=scanner.nextInt();
            }
            Set<Integer> result=new HashSet<>();

        }
    }
}